package com.pine.dao.pineframework.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pine.common.database.entity.BaseEntity;
import com.pine.dao.pineframework.constants.MenuTypeEnum;
import com.pine.dao.pineframework.constants.VisibleEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * <p>
 * 菜单表
 * </p>
 *
 * @author pine manage
 * @since 2024-08-12
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("sys_menu")
@Schema(name = "SysMenu", description = "菜单表")
public class SysMenu extends BaseEntity<Long> implements Serializable {

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = -2446550139675074796L;

    @Schema(description = "父菜单ID")
    private Long parentId;

    @Schema(description = "菜单名称")
    private String name;

    @Schema(description = "菜单类型:1=菜单,2=目录,3=外链,4=按钮")
    private MenuTypeEnum menuType;

    @Schema(description = "路由名称（Vue Router 中用于命名路由）")
    private String routeName;

    @Schema(description = "路由路径（Vue Router 中定义的 URL 路径）")
    private String routePath;

    @Schema(description = "路由参数")
    private String routeParams;

    @Schema(description = "组件路径（组件页面完整路径，相对于 src/views/，缺省后缀 .vue）")
    private String component;

    @Schema(description = "【按钮】权限标识")
    private String permission;

    @Schema(description = "显示状态:1=显示,0=隐藏")
    private VisibleEnum visible;

    @Schema(description = "显示顺序")
    private Integer sort;

    @Schema(description = "菜单图标")
    private String icon;

    @Schema(description = "跳转路径")
    private String redirect;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
}
